﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Fireball.OpenXML.Word
{
    public sealed class TableCellWidth : OpenXMLEntity
    {
        public int Width
        {
            get;
            set;
        }

        public WidthType Type
        {
            get;
            set;
        }

        public override System.Xml.Linq.XContainer ToXml()
        {
            XElement xw = new XElement(NS.WM + "tcW",
                new XAttribute(NS.WM + "w", this.Width.ToString()),
                new XAttribute(NS.WM + "type", this.Type.ToString().ToLower()));

            return xw;
        }
    }
}
